// @ts-ignore
/* eslint-disable */
import { request } from "../../utils/request";

/** 初始化选题配置 */
export async function initConfigBulletin() {
  return request<BaseResponseBean.response<BulletinData.InitConfigResult>>(
    '/bulletin/init/config',
    {
      method: 'POST',
    },
  );
}

/** 初始化选题配置 */
export async function initConfigBulletinAssignOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<Array<UserData.Organization>>>(
    '/bulletin/init/config/assign/organization',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/**
 * 获取树形 联络人列表
 * @returns
 */
export async function initConfigBulletinAssignAccount(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<Array<UserData.Organization>>>(
    '/bulletin/init/config/assign/account',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/**
 * 获取树形 通讯录列表
 * @returns
 */
export async function initConfigBulletinAssignContact(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<Array<UserData.Organization>>>(
    '/bulletin/init/config/assign/contact',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 提交通知栏  */
export async function saveBulletin(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<BulletinData.ResultVo>>('/bulletin/save', {
    method: 'POST',
    data: options || {},
  });
}

/** 推送消息  */
export async function pushBulletin(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/bulletin/push', {
    method: 'POST',
    data: options || {},
  });
}

/** 接收通知栏  */
export async function selectBulletin(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<BulletinData.ResultVo>>('/bulletin/select', {
    method: 'POST',
    data: options || {},
  });
}

/** 分页 通知栏  */
export async function pageBulletin(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<BulletinData.PageResult[]>>('/bulletin/page', {
    method: 'POST',
    data: options || {},
  });
}

// /** 获取 通知栏 组织 阅读 详情 */
// export async function listBulletinAssign(options?: { [key: string]: any }) {
//   return request<BaseResponseBean.responsePage<BulletinData.AssignResultVo[]>>(
//     '/bulletin/assign/list',
//     {
//       method: 'POST',
//       data: options || {},
//     },
//   );
// }

// /** 获取 通知栏 人员 阅读 反馈  */
// export async function listBulletinContact(options?: { [key: string]: any }) {
//   return request<BaseResponseBean.responsePage<BulletinData.AssignResultVo[]>>(
//     '/bulletin/contact/list',
//     {
//       method: 'POST',
//       data: options || {},
//     },
//   );
// }


/** 获取 配置 联系人 分页  */
export async function listBulletinSettingContact(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<BulletinData.SettingContactPageVo[]>>(
    '/bulletin/setting/contact/list',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 配置 公告 联络人  */
export async function configSettingBulletinContact(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/bulletin/setting/contact/config', {
    method: 'POST',
    data: options || {},
  });
}

/** 分页 配置 公告 联络人 用户列表  */
export async function listBulletinSettingContactsAccount(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<UserData.Account[]>>(
    '/bulletin/setting/contact/account/list',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 回执 情况  */
export async function receiptBulletin(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<Array<UserData.Organization>>>('/bulletin/receipt', {
    method: 'POST',
    data: options || {},
  });
}
